
    <script type="text/javascript" src="__STATIC__/admin/js/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" src="__STATIC__/admin/js/ueditor/ueditor.all.min.js"></script>

<form class="layui-form layui-box" style='padding:25px 30px 20px 0' action="{:url()}" data-auto="true" method="post">

    <div class="layui-form-item">
        <label class="layui-form-label">名称</label>
        <div class="layui-input-block">
            <input type="text" autofocus name="title" value='{$domainInfo.title|default=""}' required="required" title="请输入名称" placeholder="请输入名称" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">英文名称</label>
        <div class="layui-input-block">
            <input type="text" autofocus name="english_title" value='{$domainInfo.english_title|default=""}' title="请输入英文名称" placeholder="请输入英文名称" class="layui-input">
        </div>
    </div>	

    <div class="layui-form-item">
        <label class="layui-form-label">联系人</label>
        <div class="layui-input-block">
            <input type="text" name="contact" value='{$domainInfo.contact|default=""}' title="请输入联系人" placeholder="请输入联系人" class="layui-input">
        </div>
    </div>
    
    <div class="layui-form-item">
        <label class="layui-form-label">主办单位</label>
        <div class="layui-input-block">
            <input type="text" name="host" value='{$domainInfo.host|default=""}' title="请输入主办单位" placeholder="请输入主办单位" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">承办单位</label>
        <div class="layui-input-block">
            <input type="text" name="chengban" value='{$domainInfo.chengban|default=""}' title="请输入承办单位" placeholder="请输入承办单位" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">运营单位</label>
        <div class="layui-input-block">
            <input type="text" name="yunwei" value='{$domainInfo.yunwei|default=""}' title="请输入运营单位" placeholder="请输入运营单位" class="layui-input" >
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">技术支持</label>
        <div class="layui-input-block">
            <input type="text" name="tech" value='{$domainInfo.tech|default=""}' title="请输入技术支持" placeholder="请输入技术支持" class="layui-input" >
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">办公地址</label>
        <div class="layui-input-block">
            <input type="text" name="address" value='{$domainInfo.address|default=""}' title="请输入办公地址" placeholder="请输入办公地址" class="layui-input" >
        </div>
    </div>
    
    <div class="layui-form-item">
        <label class="layui-form-label">咨询电话</label>
        <div class="layui-input-block">
            <input type="text" name="tel" value='{$domainInfo.tel|default=""}' title="请输入咨询电话" placeholder="请输入咨询电话" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">电子邮箱</label>
        <div class="layui-input-block">
            <input type="text" name="email" value='{$domainInfo.email|default=""}' title="请输入电子邮箱" placeholder="请输入电子邮箱" class="layui-input" >
        </div>
    </div>

    <!-- <div class="layui-form-item">
        <label class="layui-form-label">政府网站标识码</label>
        <div class="layui-input-block">
            <input type="text" name="biaozhima" value='{$domainInfo.biaozhima|default=""}' title="请输入政府网站标识码" placeholder="请输入政府网站标识码" class="layui-input" required="required">
        </div>
    </div> -->

    <div class="layui-form-item">
        <label class="layui-form-label">ICP备案号</label>
        <div class="layui-input-block">
            <input type="text" name="icp_number" value='{$domainInfo.icp_number|default=""}' title="请输入ICP备案号" placeholder="请输入ICP备案号" class="layui-input" required="required">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">PC_LOGO</label>
        <div class='layui-input-block'>
            <img data-tips-image style="height:auto;max-height:32px;min-width:32px" src="{$domainInfo.pc_logo|default='static/admin/theme/default/img/image.png'}"/>
            <input type="hidden" name="pc_logo" onchange="$(this).prev('img').attr('src', this.value)" value="{$domainInfo.pc_logo|default=''}" class="layui-input">
            <a class="btn btn-link" data-file="one" data-type="png,jpg,jpeg" data-field="pc_logo">上传图片</a>
            <!-- <p>建议上传广告图片的尺寸为： (px)。</p> -->
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">PC_头部背景图</label>
        <div class='layui-input-block'>
            <img data-tips-image style="height:auto;max-height:32px;min-width:32px" src="{$domainInfo.pc_head|default='static/admin/theme/default/img/image.png'}"/>
            <input type="hidden" name="pc_head" onchange="$(this).prev('img').attr('src', this.value)" value="{$domainInfo.pc_head|default=''}" class="layui-input">
            <a class="btn btn-link" data-file="one" data-type="png,jpg,jpeg" data-field="pc_head">上传图片</a>
            <!-- <p>建议上传广告图片的尺寸为： (px)。</p> -->
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">PC_背景图</label>
        <div class='layui-input-block'>
            <img data-tips-image style="height:auto;max-height:32px;min-width:32px" src="{$domainInfo.pc_bg|default='static/admin/theme/default/img/image.png'}"/>
            <input type="hidden" name="pc_bg" onchange="$(this).prev('img').attr('src', this.value)" value="{$domainInfo.pc_bg|default=''}" class="layui-input">
            <a class="btn btn-link" data-file="one" data-type="png,jpg,jpeg" data-field="pc_bg">上传图片</a>
            <!-- <p>建议上传广告图片的尺寸为： (px)。</p> -->
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">PC_站点缩略图</label>
        <div class='layui-input-block'>
            <img data-tips-image style="height:auto;max-height:32px;min-width:32px" src="{$domainInfo.thumb|default='static/admin/theme/default/img/image.png'}"/>
            <input type="hidden" name="thumb" onchange="$(this).prev('img').attr('src', this.value)" value="{$domainInfo.thumb|default=''}" class="layui-input">
            <a class="btn btn-link" data-file="one" data-type="png,jpg,jpeg" data-field="thumb">上传图片</a>
            <!-- <p>建议上传广告图片的尺寸为： (px)。</p> -->
        </div>
    </div>

    <!-- <div class="layui-form-item">
        <label class="layui-form-label">微信二维码</label>
        <div class='layui-input-block'>
            <img data-tips-image style="height:auto;max-height:32px;min-width:32px" src="{$domainInfo.qrcode|default='static/admin/theme/default/img/image.png'}"/>
            <input type="hidden" name="qrcode" onchange="$(this).prev('img').attr('src', this.value)" value="{$domainInfo.qrcode|default=''}" class="layui-input">
            <a class="btn btn-link" data-file="one" data-type="png,jpg,jpeg" data-field="qrcode">上传图片</a>
            <p>建议上传广告图片的尺寸为： (px)。</p>
        </div>
    </div> -->

<!--     <div class="layui-form-item">
        <label class="layui-form-label">WAP_LOGO</label>
        <div class='layui-input-block'>
            <img data-tips-image style="height:auto;max-height:32px;min-width:32px" src="{$domainInfo.wap_logo|default='static/admin/theme/default/img/image.png'}"/>
            <input type="hidden" name="wap_logo" onchange="$(this).prev('img').attr('src', this.value)" value="{$domainInfo.wap_logo|default=''}" class="layui-input">
            <a class="btn btn-link" data-file="one" data-type="png,jpg,jpeg" data-field="wap_logo">上传图片</a>
            <p>建议上传广告图片的尺寸为： (px)。</p>
        </div>
    </div> -->
    
    <!-- {if empty($domainInfo['id'])} -->
<!--     <div class="layui-form-item">
        <label class="layui-form-label">新的密码</label>
        <div class="layui-input-block">
            <input type="password" name="password" value='' pattern="^\S{1,}$" required=""  title="请输入新的密码" placeholder="请输入新的密码" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">重复密码</label>
        <div class="layui-input-block">
            <input type="password" name="repassword" value='' pattern="^\S{1,}$" required="" title="请输入重复密码" placeholder="请输入重复密码" class="layui-input">
        </div>
    </div> -->
    <!-- {/if} -->

    <div class="layui-form-item">
        <label class="layui-form-label">经度</label>
        <div class="layui-input-block">
            <input type="text" name="longitude" value='{$domainInfo.longitude|default=""}' title="请输入经度" placeholder="请输入经度,如:100.236522" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">纬度</label>
        <div class="layui-input-block">
            <input type="text" name="latitude" value='{$domainInfo.latitude|default=""}' title="请输入纬度" placeholder="请输入纬度,如:25.597605" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">描述</label>
        <div class="layui-input-block">
            <textarea placeholder="请输入描述" title="请输入描述" class="layui-textarea" name="desc">{$domainInfo.desc|default=""}</textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">简介</label>
        <div class="layui-input-block">
            <!-- <textarea placeholder="请输入简介" title="请输入简介" class="layui-textarea" name="content">{$domainInfo.content|default=""}</textarea> -->
            <script id="container" name="content" type="text/plain">
                这里是初始化内容
            </script>
        </div>
    </div>

    <div class="hr-line-dashed"></div>

    <div class="layui-form-item text-center">
        <input type="hidden" id="vocontent" value='{$domainInfo.content|default=""}'>
        {if isset($domainInfo['id'])}<input type='hidden' value='{$domainInfo.id}' name='id'/>{/if}
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
    </div>

    <script>window.form.render();</script>
</form>

<script type="text/javascript">
        var ue = UE.getEditor('container');
        ue.ready(function() {
            ue.setHeight(300);
            //设置编辑器的内容
            // ue.setContent('hello');
            //获取html内容，返回: <p>hello</p>
            // var html = ue.getContent();
            //获取纯文本内容，返回: hello
            // var txt = ue.getContentTxt();

            var cont = $("#vocontent").val();
            // alert(cont);return false;
            ue.setContent(cont);
        });
    </script>

<!--     <script type="text/javascript">
    var data = [
    { "value": "1", "label": "one" },
    { "value": "2", "label": "two" },
    { "value": "3", "label": "three" }
];
$(function () {
    $('#admin_id').autocompleter({ source: '/admin/domain/_getAdminUs'  });
});
    </script> -->
